import BaseService from '../BaseService'
import factory from '../serviceFactory'

class AirOnlineShopService extends BaseService {
  addAirOnlineShop = factory.makeAdd('airOnlineShop', 'AirOnlineShop')
  deleteAirOnlineShop = factory.makeDelete('airOnlineShop', 'AirOnlineShop')
  batchDelete = factory.makeBatchDelete('airOnlineShop', 'AirOnlineShop')
  updateAirOnlineShop = factory.makeUpdate('airOnlineShop', 'AirOnlineShop')
  queryAirOnlineShopPage = factory.makeQuery('airOnlineShop', 'AirOnlineShop')
  detailAirOnlineShop = factory.makeDetail('airOnlineShop', 'AirOnlineShop')
  loadTicketDeptOption = factory.makeGet('/api/airOnlineShop/loadTicketDeptOption')
  loadIssueUserOption = factory.makeGet('/api/airOnlineShop/loadIssueUserOption')

  /**
   * 开启自动出票
   * autoIssueOn({ shopId })
   */
  autoIssueOn = factory.makePost('/api/airOnlineShop/autoIssueOn')

  /**
   * 关闭自动出票
   * autoIssueOff({ shopId })
   */
  autoIssueOff = factory.makePost('/api/airOnlineShop/autoIssueOff')

  /**
   * 关闭自动出票
   * validateShopNo({ id, shopNo })
   */
  validateShopNo = factory.makeGet('/api/airOnlineShop/validateShopNo')
}

export default new AirOnlineShopService()
